<?php

namespace app\qsapi\controller;

use think\App;
use think\Controller;

/**
 * 盒子基类控制器
 */
class BaseController extends Controller
{

    /**
     * 无需登录的方法
     * @var array
     */
    protected  $noNeedLogin=[];
    /**
     * 可登录 可不登录的接口
     * @var array
     */
    protected $needLogin=[];
    public function initialize(){

        if( strtoupper($_SERVER["REQUEST_METHOD"])== "OPTIONS" ){
            exit;
        }
        header("Access-Control-Allow-Origin:*");
        header('Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS,PATCH');
        header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization,Version,Platform,Packname");
    }


}
